package unit3;

public class Ex3_15_TestAddition {
    public static void main(String[] args) {
        Addition adt = new Addition();
        System.out.println("12+3=" + adt.add(12, 3));
        System.out.println("18.35+123=" + adt.add(18.35, 123));
        System.out.println("123+25+89=" + adt.add(123, 25, 89));
    }
}
class Addition {
    int add(int a, int b) { //完成两个整数相加
        return a + b;
    }
    double add(double a, double b) { //完成两个实数相加
        return a + b;
    }
    int add(int a, int b, int c) { //完成三个整数相加
        return a + b + c;
    }
}
